<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Link extends Model
{
    public static $type = [ 1 => '友情链接', 2 => '企业展示', 3 => '幻灯片' ];
    protected $appends = ['typename'];
    // 
    public function getTypenameAttribute() {
        return self::$type[$this->type];
    }
}
